package com.example.back.jpa;

import com.example.common.entity.Keys;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import org.javers.spring.annotation.JaversSpringDataAuditable;

/**
 * @author sifan
 * @PackagName:com.example.back.jpa
 * @ClassName: KeysRepository
 * @Description:
 * @date:2021/2/1 15:04
 */
@JaversSpringDataAuditable
public interface KeysRepository extends JpaRepository<Keys,Long> {

    @Query(value = "SELECT * FROM sys_keys  WHERE types_tinyint=?1",nativeQuery = true)
    List<Keys> findByType(Integer typeWay);
}
